package com.woniuxy.credit_loans.product_liu.controller;

import com.woniuxy.credit_loans.entity.BankTable;
import com.woniuxy.credit_loans.product_liu.service.BanksTableService;
import com.woniuxy.credit_loans.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "产品表中对应的所需银行名称的相关接口")
@RestController
@RequestMapping("/banks")
public class BankTableController {
    @Autowired
    private BanksTableService banksTableService;

    @ApiOperation(value = "查询所有的合作银行名称")
    @GetMapping("/selectAllBank")
    public Result selectAllBankName(){
        List<BankTable> bankTables = banksTableService.selectAllBankName();
        return Result.ok().data("allBank",bankTables);
    }
}
